package pro.cherish.knowledgeumldesignpattern.designPattern.com.cherish.bridge.real;

/**
 * 电脑类型
 */
public class Computer2 {
    protected Brand brand;

    public Computer2(Brand brand) {
        this.brand = brand;
    }
    public void sale(){
        brand.sale();
    }
}
class Desktop2 extends Computer2{

    public Desktop2(Brand brand) {
        super(brand);
    }

    @Override
    public void sale() {
        super.sale();
        System.out.println("销售台式机");
    }
}
class Labtop2 extends Computer2{
    public Labtop2(Brand brand) {
        super(brand);
    }
    @Override
    public void sale() {
        super.sale();
        System.out.println("销售笔记本");
    }
}